﻿using System;
using System.Data;
using DAL;

namespace BLL
{
    public class DiscountBLL
    {
        public DiscountBLL()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        #region IDiscount Members

        public Discount[] GetDiscount()
        {
            try
            {
                return DataAccessHelper.GetDiscountDA().GetDiscount();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public Discount GetDiscount(int bouquetID)
        {
            try
            {
                return DataAccessHelper.GetDiscountDA().GetDiscount(bouquetID);
            }
            catch (Exception ex)
            {
                throw ex;
            } throw new NotImplementedException();
        }

        public int InsertDiscount(Discount discount)
        {
            try
            {
                return DataAccessHelper.GetDiscountDA().InsertDiscount(discount);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public int UpdateDiscount(Discount discount)
        {
            try
            {
                return DataAccessHelper.GetDiscountDA().UpdateDiscount(discount);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        #endregion
    }
}